adTempus API
PreviousUpNext
IScheduler::GetObject Method

Gets an existing object.

C++
HRESULT GetObject(BSTR oid, [out,retval] IADTObject** ppObject);
C#
GetObject(String oid, [out,retval] IADTObject* ppObject);
Visual Basic
Sub GetObject(oid As String, ppObject As [out,retval] IADTObject*)
Parameters 
Description 
[in] BSTR oid 
The OID of the object to retrieve. 
[out,retval] IADTObject** ppObject 
On return, contains a pointer to the object 

If the requested object is cached on the client, GetObject returns that copy without refreshing it from the server. Call the object's Refresh method after the object is returned if you need to be sure it is up-to-date. There is no way to determine whether the method returned a local copy or retrieved the object from the server. 

Many objects are not meant to be directly retrieved. If you attempt to retrieve one of these objects, the method will fail with error ADT_E_NO_DIRECT_RETRIEVAL. This applies to most objects that are not descended from IADTIndependentObject. For example, a JobStep object cannot be directly retrieved; you must obtain it from the Steps collection of the Job that owns it. 

If the requested object does not exist the method will fail with error ADT_E_NOT_FOUND.

adTempus API Reference version 3.0.0.0, revised 10/30/2008